<?php 
defined( '_VALID_NVB' ) or die( 'Direct Access to this location is not allowed.' );
$tpl = new TemplatePower("template/info.htm");
$tpl->prepare();
	$tpl->assignGlobal("site_address",$site_address);
	$idc=intval($_REQUEST['idc']);
	$tpl->assign("pathpage",Get_Main_Catif_Name_path($idc));
	//$tpl->assign("pathpage",Get_Cat_Name("catif","id_catif",$idc));
	$sql="SELECT * FROM menu WHERE active=1 AND id_menu=$idmenu";
	$db=$DB->query($sql);
	if($rs=mysql_fetch_array($db)){
		$name=$rs['name'];	
	}
	
	if($_GET['id']){
		 $id=intval($_GET['id']);
		 $dk=" AND id_info=".$id." ";
	}else{
		$dk=" AND id_catif IN(".Get_Id_CatIf($idc).") "	;
	}
	$sql="SELECT * FROM info WHERE active=1 $dk ORDER BY thu_tu DESC, name ASC";
	$db=phan_trang_rewrite($_GET['p'],$site_address.get_url_info($idc),$sql,8,1);
	if($rs=mysql_fetch_array($db['db'])){
		$tpl->assign("content",$rs['content']);
		$name=$rs['name'];
	}
	$tpl->assign("name",$name);
	$tpl->assignGlobal("pages",$db['cac_trang']);


$tpl->printToScreen();	


?>